<div class="floatL leftBlock" >
    <?php if ($lastReviews) : ?>
        <h3>Новые отзывы</h3><br />
	<?php foreach ($lastReviews as $review) : ?>	
	    <div class="recordRow">
		<a href="<?php echo $this->createUrl('profile/view', array('id' => $review->getUser()->getId())); ?>"><img src="<?php echo $review->getUser()->getAvatar(); ?>" alt="<?php echo $review->getUser()->getProfileName(); ?>" class="floatL userPic radius5"/></a>
		<a href="<?php echo CHtml::normalizeUrl($this->createUrl('review/view', array('id' => $review->getId(), 'url' => $review->getDbData('url')))); ?>" class="recordTitle"><?php echo $review->title; ?></a><br />
		<?php echo CTruncate::trunc($review->content); ?>
		<br />
		<div class="clear padTop10"></div>
		<div class="rowInfo overHidden">		    
		    <div class="floatR">
			<?php if ($review->getCategory()) : ?>
	    		<div class="floatL margRight10"><i>Категория:</i> <a href="<?php echo $this->createUrl('/category/view', array('name' => $review->getCategory()->getDbData('name'))) ?>"><i><?php echo $review->getCategory()->getDbData('title'); ?></i></a></div>
			<?php endif; ?>
			<div class="floatL margRight10"><i>Оценка: <font color="<?php echo ($review->user_rating >= 3 ? "green" : "red"); ?>"><?php echo $review->user_rating; ?></font></i></div>
			<div class="floatL">
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/photo_marker<?php echo ($review->has_image ? '' : '_unactive'); ?>.png" class="marker "/>
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/video_marker<?php echo ($review->has_video ? '' : '_unactive'); ?>.png" class="marker "/>
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/map_marker<?php echo ($review->has_map ? '' : '_unactive'); ?>.png" class="marker "/>
			</div>
		    </div>
		</div>
	    </div>
	    <hr/>
	<?php endforeach; ?>
    <?php endif; ?>
    <div class="clear"></div>
    <div class="padTop10"></div>
    <?php if (count($lastReviews) == 10) : ?>
        <div class="floatR"><a href="<?php echo $this->createUrl('review/list', array('page' => '2')); ?>" class="btn">посмотреть остальные</a></div>
    <?php endif; ?>
</div>
<div class="rightBlock margLeft100 floatL">
    <div class="floatL firstBlock">
	<h3>Положительные мнения на отзывы</h3><br />
	<?php if ($positiveOpinions) : ?>
	    <?php foreach ($positiveOpinions as $opinion) : ?>
		<div class="recordRow">
		    <a href="<?php echo $this->createUrl('profile/view', array('id' => $opinion->getUser()->getId())); ?>"><img src="<?php echo $opinion->getUser()->getAvatar(); ?>" alt="<?php echo $opinion->getUser()->getProfileName(); ?>" class="floatL userPic radius5"/></a>
		    <?php if ($opinion->getTarget()) : ?>
		    <a href="<?php echo CHtml::normalizeUrl($this->createUrl($opinion->getDbData('target_type') . '/view', array('id' => $opinion->getTarget()->getId(), 'url' => $opinion->getTarget()->getDbData('url'), '#' => 'opinion_' . $opinion->getId()))); ?>" class="recordTitle"><?php echo $opinion->getTarget()->getDbData('title'); ?></a><br />
		    <?php endif;?>
		    <?php echo CTruncate::trunc($opinion->content); ?>
		    <br />
		    <div class="clear padTop10"></div>
		    <div class="rowInfo">
			<span class="floatL">
			    <b class="green">Оценка пользователя:</b><br />
			    <div class="starRatingFx rt<?php echo intval($opinion->user_rating); ?>"></div>
			</span>		
			<span class="floatR">
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/photo_marker<?php echo ($opinion->has_image ? '' : '_unactive'); ?>.png" class="marker "/>
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/video_marker<?php echo ($opinion->has_video ? '' : '_unactive'); ?>.png" class="marker "/>
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/map_marker<?php echo ($opinion->has_map ? '' : '_unactive'); ?>.png" class="marker "/>		    
			</span>		
		    </div>
		</div>
		<hr/>
	    <?php endforeach; ?>
	<?php endif; ?>
	<div class="padTop10"></div>
	<?php if (count($positiveOpinions) == 10) : ?>
    	<div class="floatR"><a href="<?php echo $this->createUrl('opinion/list', array('type' => 'positive')); ?>" class="btn">посмотреть остальные</a></div>
	<?php endif; ?>
    </div>
    <div class="floatL secondBlock" >
	<h3>Отрицательные мнения на отзывы</h3><br />
	<?php if ($negativeOpinions) : ?>
	    <?php foreach ($negativeOpinions as $opinion) : ?>
		<div class="recordRow">
		    <a href="<?php echo $this->createUrl('profile/view', array('id' => $opinion->getUser()->getId())); ?>"><img src="<?php echo $opinion->getUser()->getAvatar(); ?>" alt="<?php echo $opinion->getUser()->getProfileName(); ?>" class="floatL userPic radius5"/></a>
		    <a href="<?php echo CHtml::normalizeUrl($this->createUrl($opinion->getDbData('target_type') . '/view', array('id' => $opinion->getTarget()->getId(), 'url' => $opinion->getTarget()->getDbData('url'), '#' => 'opinion_' . $opinion->getId()))); ?>" class="recordTitle"><?php echo $opinion->getTarget()->getDbData('title'); ?></a><br />
		    <?php echo CTruncate::trunc($opinion->content); ?>
		    <br />
		    <div class="clear padTop10"></div>
		    <div class="rowInfo">
			<span class="floatL">
			    <b class="green">Оценка пользователя:</b><br />
			    <div class="starRatingFx rt<?php echo intval($opinion->user_rating); ?>"></div>
			</span>	
			<span class="floatR">
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/photo_marker<?php echo ($opinion->has_image ? '' : '_unactive'); ?>.png" class="marker "/>
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/video_marker<?php echo ($opinion->has_video ? '' : '_unactive'); ?>.png" class="marker "/>
			    <img src="<?php echo Yii::app()->theme->baseUrl ?>/images/icons/map_marker<?php echo ($opinion->has_map ? '' : '_unactive'); ?>.png" class="marker "/>		    
			</span>		
		    </div>
		</div>
		<hr/>
	    <?php endforeach; ?>
	<?php endif; ?>
	<div class="padTop10"></div>
	<?php if (count($negativeOpinions) == 10) : ?>
	<div class="floatR"><a href="<?php echo $this->createUrl('opinion/list', array('type' => 'negative')); ?>" class="btn">посмотреть остальные</a></div>
	<?php endif; ?>
    </div>
</div>